'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.index);
  //登录
  router.post('/api/login', controller.login.Login);
  //注册
  router.post('/api/regsiter', controller.login.Regsiter);
    //首页
  router.get('/api/homelist', controller.home.Homelist);
 
  //我的页面 移动端 信息渲染
  router.get('/api/mylogin', controller.home.Mylogin);
  //移动端账号 删除
  router.post('/dellogin', controller.home.dellogin);



   //订单列表
   router.post('/api/shop', controller.home.shop);
   router.post('/api/shopdel', controller.home.shopdel);
   router.post('/api/shopsearch', controller.home.shopsearch);
   router.post('/api/shopexit', controller.home.shopexit);
   router.post('/api/shopadd', controller.home.shopadd);
  
   //商城列表
   router.post('/api/shoplist', controller.home.shoplist);
   router.post('/api/shoplistdel', controller.home.shoplistdel);
   router.post('/api/shoplistsearch', controller.home.shoplistsearch);
   router.post('/api/shoplistexit', controller.home.shoplistexit);
   router.post('/api/shoplistadd', controller.home.shoplistadd);
  
    //热点
    router.post('/api/list', controller.home.list);
    router.post('/api/listdel', controller.home.listdel);
    router.post('/api/listsearch', controller.home.listsearch);
    router.post('/api/listexit', controller.home.listexit);
    router.post('/api/listadd', controller.home.listadd);


};
